package zuoye_1;

public class zuoye_6 {
	public static void main(String[] args){
		int ge,shi,bai,qian;
		for(int i=0;i<9999;i++)
		{
			ge=i%10;
			shi=i/10%10;
			bai=i/100%10;
			qian=i/1000%10;
			if(ge==7||shi==7||bai==7||qian==7||i%7==0)
			{
				System.out.println(i);
			}
		}
	}
}
